<div id="fashion_hilight">
	<ul>
		<?php if(!empty($dataFashionHilight)) foreach($dataFashionHilight as $key => $value):?>
			<li>
				<a class="hilight" href="<?php echo base_url();?>archives/<?php echo $value->fashion_id.'-'.seo_url($value->fashion_name);?>" target="_blank">
					<div class="image">
						<?php echo exec_image(array(
							'folder' => 'fashion',
							'dimension' => '155x235',
							'file_name' => @$value->image->fashion_file_name.'.'.@$value->image->fashion_file_ext,
							'alt' => ''.$value->fashion_name.'',	
							'title' => ''.$value->fashion_name.''	
							)
						);?>	
					</div>
				</a>
				<div class="info">
					<a href="<?php echo base_url();?>archives/<?php echo $value->fashion_id.'-'.seo_url($value->fashion_name);?>" target="_blank"><h2><?php echo $value->fashion_name;?></h2></a>
					<p>จำนวน <?php echo $value->image_count;?> รูป</p>
					<p>จำนวนที่ดู <?php echo $value->views;?> ครั้ง</p>
				</div>								
			</li>
		<?php endforeach;?>
	</ul>
<!--	<?php if(!empty($dataFashionHilight)) foreach($dataFashionHilight as $key => $value):?>
	<div class="hilight_id_<?php echo $value->fashion_id;?>" <?php echo ($key==0 ? '':'style="display:none;"');?>>
		<a href="<?php echo base_url();?>archives/<?php echo $value->fashion_id.'-'.seo_url($value->fashion_name);?>" target="_blank">
			<div class="image">
				<?php echo exec_image(array(
					'folder' => 'fashion',
					'dimension' => '650x320',
					'file_name' => @$value->image->fashion_file_name.'.'.@$value->image->fashion_file_ext,
					'alt' => ''.$value->fashion_name.'',	
					'title' => ''.$value->fashion_name.''	
					)
				);?>	
			</div>
		</a>
		<div class="info">
			<div class="fixHeight">
				<a href="<?php echo base_url();?>archives/<?php echo $value->fashion_id.'-'.seo_url($value->fashion_name);?>" target="_blank"><h2><?php echo $value->fashion_name;?></h2></a>
				<p><?php echo $value->fashion_brief;?></p>
			</div>
			<div class="post">
				วันที่ <?php echo date('d/m/Y',strtotime($value->create_date));?><span class="grayLight"> l </span>ดู <?php echo number_format($value->views);?> ครั้ง
			</div>
		</div>
	</div>
	<?php endforeach;?>
	<ul>
		<?php if(!empty($dataFashionHilight)) foreach($dataFashionHilight as $key => $value):?>
		<li>
			<a href="javascript:void(0);" onclick="javascript:swapHilight(this);" class="hilight_id_<?php echo $value->fashion_id;?>" <?php echo ($key==0 ? 'style="display:none;"':'');?>>
				<div class="image">
					<?php echo exec_image(array(
							'folder'   => 'fashion',
							'dimension'=> '85x50',
							'file_name'=> @$value->image->fashion_file_name.'.'.@$value->image->fashion_file_ext,
							'alt'      => ''.$value->fashion_name.'',
							'title'    => ''.$value->fashion_name.''
						)
					);?>
				</div>
			</a>
		</li>
		<?php endforeach;?>
	</ul>	-->			
</div> 
<div id="left_side">
	<div id="fashion">
		<!--ข่าวล่าสุด-->
		<div class="header"><span>แฟชั่นมาใหม่</span></div>
		<div id="ajax_pager"><?php echo $dataFashionUpdate;?></div>
	</div>
</div>
<div id="right_side">
	<!--Module-->
	<?php
	if(!empty($module))
	foreach($module as $value):?>
	<?php echo $value;?>
	<?php endforeach;?>
</div>
<div class="clear">
</div>
<script type="text/javascript" language="javascript">
(function($) {
/*whatever jQuery stuff*/
	$(function(){
		//multipleElementsCycle
		$("#slider").multipleElementsCycle({
			scrollCount: 4,
			start: 0,
			jumpTo: '.cycleToPoint'
		});
			
		/* Auto Slide Hilight by ONIPHP*/
		var autoCycleHilight = null;
		var hilight_index = 1;
		var hilight_total = $('#fashion_hilight a[class*="hilight_id_"]').length;
		var hilight_timeout = 5000;
		autoCycleHilight = setInterval(function() {
			// Do stuff here
			autoSlideHilight();					
		},hilight_timeout);	
		
		$('#fashion_hilight a[class*="hilight_id_"]').each(function(){
			$(this).click(function(){
				hilight_index = $(this).parent().index();			
			});
		});
		
		$('#fashion_hilight').hover(function() {
			clearInterval(autoCycleHilight);    
		}, function() {
			autoCycleHilight = setInterval(function(){ 
				// Do stuff here
				autoSlideHilight();					
			},hilight_timeout);
		});
		
		var autoSlideHilight = function()
		{
			// Do stuff here
			var ele = $('#fashion_hilight a[class*="hilight_id_"]').eq(hilight_index);
			var hilight_id = ele.attr('class');
			var class_show = $('#fashion_hilight').find('div[class*="hilight_id_"]:visible:lt(5)').attr('class');
			var on_show = $('#fashion_hilight').find('li a[class="'+class_show+'"]');
			$('#fashion_hilight').find('div[class*="hilight_id_"]:lt(5)').hide();
			$('#fashion_hilight').find('div[class="'+hilight_id+'"]').fadeIn('fast');
			/*Swap Content*/
			ele.replaceWith(on_show.css({'display':'block'}).clone());
			$(on_show).replaceWith(ele.css({'display':'none'}).clone());
			hilight_index = hilight_index + 1;
			if(hilight_index >= hilight_total) hilight_index = 1;					
		}
		/* End Auto Slide Hilight by ONIPHP*/		
	});	
})(jQuery);
</script>